<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
 <script language=javascript>
function unselectall(){
if(document.myform.chkAll.checked){
document.myform.chkAll.checked = document.myform.chkAll.checked&0;
}
}
function CheckAll(form){
for (var i=0;i<form.elements.length;i++){
var e = form.elements[i];
if (e.Name != 'chkAll'&&e.disabled==false)
e.checked = form.chkAll.checked;
}
}


function aa(){
    var r=document.getElementsByName("id");  
    for(var i=0;i<r.length;i++){
         if(r[i].checked){
        	 location.href = "http://www.baidu.com";
         alert(r[i].value+","+r[i].nextSibling.nodeValue);
       }
    }      
}

</script>
</head>
<body>
<form name="myform" method="post" id="myform" action="" >

<input name='id' type='checkbox' onclick='unselectall()' id='id' value='1'> 设计家园

<input name='id' type='checkbox' onclick='unselectall()' id='Checkbox1' value='2'> 网页教程

<input name='id' type='checkbox' onclick='unselectall()' id='Checkbox2' value='3'> 酷站欣赏

<input name='id' type='checkbox' onclick='unselectall()' id='Checkbox3' value='4'> 网页素材

<input name='chkAll' type='checkbox' id='chkAll' onclick='CheckAll(this.form)' value='checkbox'>
全选


<input type="button" onclick="aa()" value="选中值">




  
</form>
</body>
</html>